home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CUCD / Programming / DiceSource / installer / format-floppy < prev    next >
Text File  |  1994-02-20  |  3KB  |  90 lines

  1. (delopts "force")        ;Unprotect destination files automatically
  2. (user 2)            ;Ask them all the questions.  Sorry.
  3.  
  4. ; Set up a error cleanup routine
  5. ;
  6. (onerror)
  7. (complete 0)
  8.  
  9. (set df0 (if (getassign "DF0" "d") ("DF0:") ("Drive not available")))
  10. (set df1 (if (getassign "DF1" "d") ("DF1:") ("Drive not available")))
  11. (set df2 (if (getassign "DF2" "d") ("DF2:") ("Drive not available")))
  12. (set df3 (if (getassign "DF3" "d") ("DF3:") ("Drive not available")))
  13. (set drive "!#@")
  14. (until (getassign drive "d")
  15.     (SET drive
  16.         (cat "DF"
  17.             (askchoice
  18.                 (prompt "Which floppy should I install to?")
  19.                 (help   "DICE Needs to format a floppy to hold the installed"
  20.                         "version.  You will be prompted to insert a floppy in"
  21.                         "this drive as a part of the installation process"
  22.                 )
  23.                 (choices (df0) (df1) (df2) (df3))
  24.                 (default 0)
  25.             )
  26.         )
  27.     )
  28. )
  29.  
  30. (set drivename (cat drive ":"))
  31. (if (not
  32.         (askbool
  33.             (prompt "Please insert a floppy into " drivename
  34.                     " for formatting to receive the DICE installation\n"
  35.                     "Note: All information on this diskette will be lost"
  36.                     "Select Proceed to continue, Cancel to abort"
  37.             )
  38.             (help   "You need to put a disk into drive " drivename
  39.                     " in order for DICE to be able to format it and then"
  40.                     "put the DICE programs on it"
  41.             )
  42.             (choices "Proceed" "Cancel")
  43.         )
  44.     )
  45.     (exit)
  46. )
  47.  
  48. (working "Formatting floppy in drive " drivename)
  49. (textfile
  50.     (dest "ram:nl_file")
  51.     (append "")
  52.     (safe)
  53. )
  54.  
  55. (run "format <ram:nl_file drive " drivename " name Dice_3.0 NOICONS")
  56.  
  57. (delete "ram:nl_file" (safe))
  58.  
  59. (makeassign "DCC"      dice_dest)
  60. (makeassign "DTMP"     "dcc:dtmp")
  61. (makeassign "DINCLUDE" "dcc:include")
  62.  
  63. (debug "did it")
  64. (exit)
  65. ;***********************************************************************
  66. ; Begin the joys of installation. Setup Dice drawer and icon if not there.
  67. ; At this point we have a valid destination, so we tell installer where
  68. ; the application will end up so the exit page will be correct -- also,
  69. ; the installation log file (if any) will be copied to the destination.
  70. ;***********************************************************************
  71. (set @default-dest dice_dest)
  72.     (
  73.         (makedir dice_dest (infos))
  74.     (makedir (tackon dice_dest "Bin"     ) (infos))
  75.     (makedir (tackon dice_dest "Tools"   ) (infos))
  76.     (makedir (tackon dice_dest "Config"  ) (infos))
  77.     (makedir (tackon dice_dest "User"    ) (infos))
  78.     (makedir (tackon dice_dest "Examples") (infos))
  79.     (makedir (tackon dice_dest "dtmp"))
  80.     (makedir (tackon dice_dest "lib"))
  81.     (makedir (tackon dice_dest "doc"))
  82.     (makedir (tackon dice_dest "s"))
  83.     (makedir (tackon dice_dest "Rexx"))
  84.     (makedir (tackon dice_dest "Include"))
  85.     (makedir (tackon dice_dest "Dlib"))
  86.     )
  87.  
  88.  
  89. (exit)
  90.